<template>
  <div class="box">
    <div :class="['icon_', store.basicData.status == 2 ? 'yellow' : '']">
      <img v-if="store.basicData.status == 0" src="../assets/icon.png" alt="" />
      <img
        v-else-if="store.basicData.status == 2"
        src="../assets/icon2.png"
        alt=""
      />
      <span style="margin-left: 8px">
        {{
          store.basicData.status == "0"
            ? "设备已报修"
            : store.basicData.status == "2"
            ? "设备已停用"
            : ""
        }}
      </span>
    </div>
  </div>
</template>
<script setup>
import { basicData } from "../store/data.js";
const store = basicData();
</script>
<style scoped>
.yellow {
  background: rgba(255, 171, 0, 0.7) !important;
}
.icon_ {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 145px;
  height: 48px;
  border-radius: 24px 0 0 24px;
  background: rgba(244, 85, 74, 0.7);
  font-family: "PingFang SC";
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  box-sizing: border-box;
  color: #ffffff;
  display: flex;
  align-items: center;
  padding-left: 15px;
}
.box {
  position: relative;
  box-sizing: border-box;
  width: 100vw;
  height: 48px;
  margin-top: 37px;
}
</style>